Mounted on a movable body such as an automobile and the like in recent years is a distance measuring apparatus using a method for measuring a relative distance from a preceding vehicle, based on an image of a traveling direction taken by a camera. One example of a method for measuring a relative distance from a preceding vehicle is, for example, a position measuring method described in patent literature 1 (hereinafter, referred to as a conventional technology).
In the conventional technology, a straight flat path model image assumed to be an image of a travel path when traveling on a straight flat path is generated based on a taken image. Then, by measuring a relative distance from an object, based on a position of the object from a lower end of the straight flat path model image and based on a position of the object from a lower end of an actual travel path image, the relative distance from the object can be accurately measured even on a travel path having an inclined path.